using Godot;
using System;

public partial class Button : Godot.Button
{
	private Tween _tween;
	
	public override void _Ready()
	{
		this.Modulate = Colors.Transparent;
		this.Disabled = true;
		GetTree().CreateTimer(1.0f).Timeout += MyDelayedMethod;
	}
	void MyDelayedMethod(){
		_tween = CreateTween();
		_tween.TweenProperty(this, "modulate:a", 0.9f, 2.0f)
			.SetEase(Tween.EaseType.Out);
		_tween.Finished += () => this.Disabled = false;
	}
	
	void _on_pressed(){
		GetTree().ChangeSceneToFile("res://scene/stage1.tscn");
	}
	
}
